import { get, post, put, del } from '@/js/api/dataSource'
export default {
	material: {
		// 分页查询接口
		findAllMaterial () {
			return post({ url: '/technology/material/pageQuery', responseComplete: true })
		},
		findListAll () {
			return get({ url: '/technology/material/findListAll' })
		},
		// 产成品和原料所有列表接口（含停用） 参数 processingFlag:1产品2原料 0全部
		findMeterialByType () {
			return get({ url: '/technology/material/findMeterialByType' })
		},
		// 启用停用
		updateEnables (id) {
			return put({ url: '/technology/material/updateEnable', responseComplete: true })
		},
		getNextCode () {
			return get({ url: '/technology/material/getNextCode' })
		},
		getMaterialTypeNextCode () {
			return get({ url: '/technology/materialType/getNextCode' })
		},
		saveOrUpdate () {
			return post({ url: '/technology/material/saveOrUpdate', responseComplete: true, autoSuccessMsg: true })
		},
		findMaterialDetailById () {
			return get({ url: '/technology/material/findDetailByParam' })
		},
		// 批量删除
		deleteMaterialMulity () {
			return del({ url: '/technology/material/batchDelete', responseComplete: true })
		},
		// 物料类别
		findMaterialTypeTree () {
			return get({ url: 'technology/materialType/findMaterialTypeTree' })
		},
		findMaterialSignListAll () {
			return get({ url: '/technology/materialSign/findMaterialSignListAll' })
		},
		// 物料单位维护
		unitSaveOrUpdate () {
			return post({ url: '/technology/material/unit/saveOrUpdate' })
		},
		// 物料单位删除
		unitDelete () {
			return del({ url: '/technology/material/unit/delete', autoSuccessMsg: true })
		},
		// 物料单位list
		findUnitListByParam () {
			return get({ url: '/technology/material/unit/findUnitListByParam' })
		},
		// 物料类别 查询所有物料类别
		findListTypeAll () {
			return get({ url: '/technology/materialType/findListTypeAll' })
		},
		// 物料类别 删除类别
		// 工序类型保存 新增修改
		materialTypeSaveOrUpdate () {
			return post({ url: '/technology/materialType/saveOrUpdate', responseComplete: true, autoSuccessMsg: true })
		},
		// 删除类别
		deleteMaterialTypeById (id) {
			return del({ url: `/technology/materialType/deleteById/${id}`, responseComplete: true, autoSuccessMsg: true })
		}
	}
}
